rem echo off
@FOR /F "usebackq skip=2 tokens=3,4 delims='" %%u in (`FIND.EXE /i "IZ_CALVERSION" includes\vars.php`) DO (SET LCVER=%%~v)
rem echo Enter the version number...
rem set /P LCVER=
set RELEASEDIR=C:\Users\Echilon\Documents\website\izeit.nu\releases\current
del izeit*.zip
rmdir /S /Q %RELEASEDIR%\izeit\
rmdir /S /Q %RELEASEDIR%\temp\

echo Copying files
mkdir %RELEASEDIR%\temp\
mkdir %RELEASEDIR%\izeit\
xxcopy /X*\.svn\ /EXexcl.txt /S %RELEASEDIR%\ %RELEASEDIR%\temp\
cd %RELEASEDIR%\temp\
E:\progs\winrar\winrar a %RELEASEDIR%\izeit_%LCVER%-src.zip -x*\.svn -x*\.svn\* * -r -s -m5 -inul
cd %RELEASEDIR%
move izeit_%LCVER%-src.zip C:\Users\Echilon\Documents\website\izeit.nu\releases\archive\
"E:\Progs\PHP LockIt!\phplockit.exe"

echo Zipping archives
E:\progs\winrar\winrar a izeit_%LCVER%.zip izeit -r -s -m5 -inul
move izeit_%LCVER%.zip C:\Users\Echilon\Documents\website\izeit.nu\releases\

rmdir /S /Q %RELEASEDIR%\izeit
rmdir /S /Q %RELEASEDIR%\temp